{% extends "base.html" %}

{% load table_row_highlight %}

{% block content %}
	<h1 class="help_header">
	{{ user_name }} - active tasks
	</h1>
	
	{% if tasks %}
	
		<div id="tasks">
			<table cellspacing="0" style="table-layout: fixed;">
				<tr id="Menu">
					<th class="caption" style="width:18px;">
						<img src="/appmedia/yes.gif">
					</th>
					<th class="caption">
						Summary
					</th>
					<th class="caption" style="width:70px;">
						Date
					</th>
					<th class="caption" style="width:70px;">
						Time&nbsp;spent
					</th>
				</tr>
	
				{% for task in tasks %}
					<tr id="task_{{task.id}}">
							<td class="odd" nowrap width="16" id="task_is_done{{task.id}}">
								{% if task.done %}
									<img src="/appmedia/done.gif">
								{% else %}
									<img src="/appmedia/undone.gif">
								{% endif %}
							</td>
							<td class="odd" width="500">
								{{task.name}}
								{% if task.project %}
									- {{task.project}}
								{% endif %}
								{% if task.text %}
									<span class="light">
									- {{task.text|escape}}
									</span>
								{% endif %}
							</td>
							<td class="odd"  align="center">
								{% if task.task_date %}
									{{task.task_date}}
								{% endif %}
								&nbsp;
							</td>
							<td class="odd" align="right" style="width:60px;padding-right:10px">
								{{task.time_spent|floatformat:1}} h
							</td>
						</tr>
				{% endfor %}
			</table>
		</div>
	{% else %}
		<p></p>
		There is no active tasks here, or may be <b>{{user_name}}</b> don't share tasks with you.
		<p></p>
		<b>Note:</b> It's may be required to <a href="/accounts/login/">Sign in</a> to view shared tasks. 
		<br />
		User may share tasks with anyone or only with some users. If you one of them, try to <a href="/accounts/login/">Sign in</a>
		and revisit this page.
		<p></p>
	{% endif %}
{% endblock %}